﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MIC_Interfaces
{
    class Triangle : IRegularPolygon
    {
        public Triangle(float sideLength)
        {
            SideLength = sideLength;
            SidesCount = 3;
        }

        public float GetArea()
        {
            return SideLength * SideLength * (float)Math.Sqrt(3) / 4;
        }

        public int SidesCount
        {
            get;
            set;
        }

        public float SideLength
        {
            get;
            set;
        }

        public float GetPerimeter()
        {
            return SideLength * SidesCount;
        }
    }
}
